package com.code.user.model.po;

import com.code.commons.annotations.EnumValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 登录用户信息和凭证信息PO
 *
 * @author tangyifei
 */
@ApiModel("登录用户信息和凭证信息PO")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LoginUserCredential implements Serializable {

    private static final long serialVersionUID = -3812252469027929503L;

    @ApiModelProperty(value = "用户主键", example = "1")
    private String id;

    @ApiModelProperty(value = "凭证主键", example = "1")
    private Long loginCredentialId;

    @ApiModelProperty(value = "用户手机号", example = "150****0055")
    private String phone;

    @ApiModelProperty(value = "区号", example = "+86")
    private String areaNo;

    @ApiModelProperty(value = "用户昵称", example = "挖矿达人")
    private String nickname;

    @ApiModelProperty(value = "性别", example = "1")
    private String gender;

    @ApiModelProperty(value = "头像", example = "1")
    private String avatar;

    @ApiModelProperty(value = "类型", example = "1")
    @EnumValue(enumClass = User.UserTypeEnum.class, enumMethod = "isValidName")
    private String type;

    @ApiModelProperty(value = "账号状态", example = "1")
    @EnumValue(enumClass = User.UserStatusEnum.class, enumMethod = "isValidName")
    private String status;

    @ApiModelProperty(value = "用户等级", example = "V1")
    private String userLevel;

    @ApiModelProperty(value = "是否为超级管理员 0不是超级管理员  1超级管理员", example = "1")
    private Integer isAdmin;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "账号", example = "1")
    @Length(min = 1, max = 128)
    private String account;

    @ApiModelProperty(value = "密码", example = "******")
    private String pwd;

    @ApiModelProperty(value = "交易密码", example = "******")
    private String tranPwd;

    @ApiModelProperty(value = "用户币种余额相关的版本号", example = "0")
    private Integer userCoinBalanceVersion;

    @ApiModelProperty(value = "用户AZ计划币种余额相关的版本号", example = "0")
    private Integer userAzPlanBalanceVersion;

    @ApiModelProperty(value = "密码加密随机盐", example = "1")
    @Length(max = 64)
    private String randomSalt;

    @ApiModelProperty(value = "账号类型", example = "1")
    @EnumValue(enumClass = LoginCredential.LoginCredentialTypeEnum.class, enumMethod = "isValidName")
    private String loginCredentialType;

    @ApiModelProperty(value = "自动获得的USD金额（矿池大小）", example = "1")
    private BigDecimal orePool;

    @ApiModelProperty(value = "0 未充值  1已充值（比如得到2000usd）2已释放完(比如已释放完2000usd)  3进入第一轮推荐  4进入第二轮推荐 5两轮推荐完成并成为V1用户 6复投（复投只取被推荐人的10%）", example = "1")
    private Integer azPlanStatus;

    @ApiModelProperty(value = "复投状态（1复投 0未复投）", example = "1")
    private Integer doubleThrowState;

}
